package com.mf.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import io.swagger.v3.oas.annotations.media.Schema;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serializable;
import java.time.LocalDateTime;

import lombok.Getter;
import lombok.Setter;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * <p>
 * 数据字典
 * </p>
 *
 * @author mf
 * @since 2024-06-08
 */
@Getter
@Setter
@TableName("t_dictionary")

public class Dictionary implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 父级id
     */
    @NotNull(message = "父级id不能为空")
    private Integer pid;

    /**
     * 编号
     */
    private String code;

    /**
     * 名称
     */
    private String name;

    /**
     * 值
     */
    @NotBlank(message = "值不能为空")
    private String value;


    private LocalDateTime createdTime;

    private LocalDateTime updateTime;
}